package com.you.atlas.web.member.module.screen;

import com.alibaba.citrus.turbine.Context;
import com.alibaba.citrus.turbine.Navigator;
import com.alibaba.citrus.turbine.TurbineRunData;
import com.alibaba.citrus.turbine.dataresolver.Param;
import com.you.common.webx.constant.HttpSessionConstant;

public class Login {

    public void execute(@Param("loginId") String loginId, TurbineRunData rundata, Context context, Navigator navigator) {
        
//        if (AuthContext.getContext().isLogin()) {
//            navigator.redirectTo("memberModule").withTarget("home.vm").withParameter("member_id",
//                                                                                     AuthContext.getContext().getMemberId().toString());
//            return;
//        }
        context.put("loginId",
                    loginId != null ? loginId : rundata.getCookies().getString(HttpSessionConstant.LAST_LOGIN_ID));
    }
}
